package com.example.design.decorator.cake;

/**
 * @Description 抽象装饰类
 * @ClassName AbstractDecorator
 * @Author Administrator
 * @Date 2020/5/13 16:35
 * @Version 1.0.0
 */
public abstract class AbstractDecorator extends AbstractCake {

    private AbstractCake abstractCake;

    public AbstractDecorator(AbstractCake abstractCake) {
        this.abstractCake = abstractCake;
    }

    protected abstract void doSomething();

    @Override
    protected String getDesc() {
        return this.abstractCake.getDesc();
    }

    @Override
    protected int cost() {
        return this.abstractCake.cost();
    }
}
